{% extends "base.html" %}
{% block content %}
<div class="container">
    <form method="POST">
    {{ form.hidden_tag() }}
    {{ form.name.label }} {{ form.name(size=20) }}
    {{ form.number.label }} {{ form.number(size=20) }}
    {{ form.email.label }} {{ form.email(size=20) }}
    {{ form.address.label }} {{ form.address(size=20) }}
    <input type="submit" name="submit" value="提交">
    <!--{{ form.submit }}-->
    </form>  
    <form method="POST">
    {{ search_form.hidden_tag() }}
    {{ search_form.search.label }} {{ search_form.search(size=20) }}
    <input type="submit" name="search_submit" value="查找">
    </form>


</div>
    <div class="container">
        <table class="table table-hover">
    <tr class="active">
        <th>name</th>
        <th>number</th>
        <th>email</th>
        <th>address</th>
    </tr>
    {% if users %}
    {% for user in users %}
    <tr>
        <td class="success"> {{user.name}} </td>
        <td class="warning"> {{user.number}} </td>
        <td class="info"> {{user.email}} </td>
        <td class="danger"> {{user.address}} </td>
    </tr>
    {% endfor %}
    {% endif %}  
    </table>
    </div>  

{% endblock %}